//
//  viewOfTop.m
//  mintHome
//
//  Created by 朱彦名 on 16/6/17.
//  Copyright © 2016年 朱彦名. All rights reserved.
//

#import "viewOfTop.h"
#import "viewOfScroll.h"
#import "album.h"
@interface viewOfTop()

@property (nonatomic, retain) UILabel *laobelOfLeft;




@end
@implementation viewOfTop

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatTop];
    }
    return self;
    

}
- (void)creatTop{

    self.laobelOfLeft = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 80, 30)];
    [self addSubview:self.laobelOfLeft];
    self.laobelOfLeft.backgroundColor = [UIColor clearColor];
    self.laobelOfLeft.text = @"专题合集";
    
    self.buttonOfRight = [UIButton buttonWithType:UIButtonTypeSystem];
    self.buttonOfRight.frame = CGRectMake(SCREEN_WIDTH - 80 , 0, 80, 30);
    [self addSubview:self.buttonOfRight];
    self.buttonOfRight.backgroundColor = [UIColor clearColor];
    [self.buttonOfRight setTitle:@"查看全部>" forState:UIControlStateNormal];
    
    
    BOOL model = [AccountManager sharedInstance].isNight;
    
    if (model) {
        
        self.backgroundColor = [UIColor silverColor];
        
        
    }
    else{
        
        self.backgroundColor = [UIColor whiteColor];
        
    }
    
}

- (void)setLightDay{
    NSLog(@"%s",__func__);
    
    [NightManager setBackgroundColorWithView:self];
    
    
    
}
- (void)setNightDay{
    NSLog(@"%s",__func__);
    
    
    [NightManager setBackgroundColorWithView:self];
    
    
}

@end
